<%--
  Created by IntelliJ IDEA.
  User: LilacRvngClst
  Date: 2025/6/18
  Time: 17:23
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<html>
<head>
    <title>添加用户</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            background: #f4f6f8;
            margin: 0;
            padding: 20px;
        }

        h2 {
            text-align: center;
            color: #333;
        }

        form {
            width: 400px;
            margin: 30px auto;
            padding: 30px;
            background-color: #ffffff;
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
            border-radius: 8px;
        }

        label {
            display: block;
            margin-bottom: 8px;
            font-weight: bold;
        }

        input[type="text"],
        input[type="number"],
        input[type="email"] {
            width: 100%;
            padding: 10px;
            margin-bottom: 15px;
            border: 1px solid #ccc;
            border-radius: 4px;
            box-sizing: border-box;
        }

        input[type="submit"] {
            width: 100%;
            padding: 10px;
            background-color: #007BFF;
            color: white;
            border: none;
            border-radius: 4px;
            cursor: pointer;
            font-size: 16px;
        }

        input[type="submit"]:hover {
            background-color: #0056b3;
        }

        .button-container {
            text-align: center;
            margin-top: 20px;
        }

        .back-link {
            text-decoration: none;
            color: #007BFF;
        }

        .back-link:hover {
            text-decoration: underline;
        }
    </style>
</head>
<body>
<h2>添加用户</h2>
<form action="${pageContext.request.contextPath}/addUser" method="post">
    <label for="username">用户名:</label>
    <input type="text" id="username" name="username" required/>

    <label for="age">年龄:</label>
    <input type="number" id="age" name="age" required/>

    <label for="email">邮箱:</label>
    <input type="email" id="email" name="email" required/>

    <input type="submit" value="提交"/>
</form>

<div class="button-container">
    <a href="${pageContext.request.contextPath}/users" class="back-link">返回用户列表</a>
</div>
</body>
</html>
